<template>
    <div class="export-container" v-loading="fullscreenLoading" element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(255,255,255,0.5)" :element-loading-text="$t('message.bhView.loading')">
        <!-- 第一行 -->
        <div class="nav">
            <div :class="'tabs-container'">
                <el-button @click="excelBtnClick('top'), (btnActiveClass = true)"
                    :type="btnActiveClass ? 'primary' : ''">
                    {{ $t("message.environmentSetting.export.label_1") }}
                </el-button>
                <el-button @click="excelBtnClick('bottom'), (btnActiveClass = false)"
                    :type="!btnActiveClass ? 'primary' : ''">
                    {{ $t("message.environmentSetting.export.label_2") }}
                </el-button>
            </div>
            <div :class="radioDisabledTop
                ? 'isSelect tabs-container'
                : 'tabs-container'
                " style="border: 1px solid #d3d3d3;">
                <el-radio v-model="radio" label="1" :disabled="radioDisabledTop">{{
                    $t("message.environmentSetting.export.label_3")
                }}</el-radio>
                <el-radio v-model="radio" label="2" :disabled="radioDisabledTop">{{
                    $t("message.environmentSetting.export.label_4")
                }}</el-radio>
            </div>
        </div>
        <!-- 第二行 -->
        <div class="nav">
            <div :class="radioDisabledBottom
                ? 'isSelect tabs-container'
                : 'tabs-container'
                " style="border: 1px solid #d3d3d3;">
                <el-radio v-model="radioTow" label="2" :disabled="radioDisabledBottom" @change="towRowChange">{{
                    $t("message.environmentSetting.export.label_5")
                }}</el-radio>
                <el-radio v-model="radioTow" label="1" :disabled="radioDisabledBottom || checked"
                    @change="towRowChange">{{
                        $t("message.environmentSetting.export.label_6")
                    }}</el-radio>
            </div>
            <div :class="!rowDisabledIpt ? 'row-input active-row-input' : 'row-input'
                ">
                <span>{{
                    $t("message.environmentSetting.export.label_7")
                }}</span>
                <el-input v-model="value" :disabled="rowDisabledIpt" @input="changeInput"></el-input>
                <span>{{
                    $t("message.environmentSetting.export.label_8")
                }}</span>
            </div>
        </div>
        <!-- Export Item -->
        <div class="export-item-container">
            <div class="item-container" v-for="(Itme, index) in export_item_arr" :key="index">
                <div class="" v-for="(itm, index) in Itme" :key="index" v-if="itm.Customer == 'All'">
                    <div class="item-nth-child">{{ itm.title }}</div>
                    <div v-for="(i, _index) in itm.children" :key="_index">
                        <el-button class="item" @click="exportItem(i)" :disabled="i.btn"
                            :style="{ visibility: i.title === undefined ? 'hidden' : 'visible' }">
                            {{ i.title }}
                        </el-button>
                    </div>
                </div>
                <div class="" v-for="(itm, index) in Itme" :key="index"
                    v-if="itm.Customer == 'Customer003' && $hasOption('OPT_IDEM')">
                    <el-checkbox style="margin-top: 20px;transform: translateX(15px) translateY(-8px);"
                        v-model="checked" @change="checkedChangeFn"></el-checkbox>
                    <div v-for="(i, _index) in itm.children" :key="_index">
                        <el-button class="item" @click="exportItem(i)" :disabled="i.btn">
                            {{ i.title }}
                        </el-button>
                    </div>
                </div>
                <div class="" v-for="(itm, index) in Itme" :key="index"
                    v-if="itm.Customer == 'OPT_FOC' && $hasOption('OPT_FOC')">
                    <div class="item-nth-child">{{ itm.title }}</div>
                    <div v-for="(i, _index) in itm.children" :key="_index">
                        <el-button class="item" @click="exportItem(i)" :disabled="i.btn">
                            {{ i.title }}
                        </el-button>
                    </div>
                </div>
            </div>
        </div>
        <export-dialog ref="ExportDialogRef" v-if="export_dialog_flag" @CloseExprotDiloag="export_dialog_flag = false"
            @ExprotItem="exprotDialogItem" :title="title" :radioTow="radioTow"></export-dialog>

        <import-dialog v-if="import_dialog_flag" @CloseImportDiloag="import_dialog_flag = false" :title="title"
            :_api="api"></import-dialog>
    </div>
</template>

<script>
import {
    exportBaseStyle,
    exportPlat,
    exportPFD,
    exportSummary,
    exportSummaryDetial,
    exportThickPosition, ExportCGThckStyle,
    exportThickStyle,
    exportThickDeterRes,
    ExportPartSpecification,
    ExportPartSpecificationVerify,
    ExportThicknessMeasurementExperience,
    ExDetailedSpecification,
    ExportConstructionPlan,
    ExInspectionPlan, exportCGOperationDetials,
    ExLineIndexExcel,
    exportDamageConditionTable,
    exportTensileAllowableStressTable,
    ExportPartsSpec,
} from "@/api/api";
import eventBus from "@/eventBus/bus";
import ExportDialog from "../Excel/ExportDialog/ExportDialog.vue";
import ImportDialog from "../Excel/ImportDialog/ImportDialog.vue";
import { getLocalStorage } from "@/utils/storage";
export default {
    name: "Export",
    data() {
        return {
            checked: false,
            export_item_arr: [
                [
                    {
                        Customer: 'All',
                        title: this.$t("message.environmentSetting.export.title_1"),
                        children: [
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_2"
                                ),
                                _api: "/api/ExcelExec/importPlat",
                                btn: false,
                            },
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_3"
                                ),
                                _api: "/api/ExcelExec/importPFD",
                                btn: false,
                            },
                            // {
                            //     title: this.$t(
                            //         "message.environmentSetting.export.title_4"
                            //     ),
                            //     _api: "",
                            // },
                        ],

                    }
                ],
                [
                    {
                        Customer: 'All',
                        title: this.$t("message.environmentSetting.export.title_5"),
                        children: [
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_6"
                                ),
                                _api: "/api/ExcelExec/importBaseStyle",
                                btn: false,
                            },
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_7"
                                ),
                                _api: "/api/ExcelExec/GetImportDetailedSpecificationSheets",
                                btn: false,
                            },
                            // {
                            //     title: this.$t(
                            //         "message.environmentSetting.export.title_8"
                            //     ),
                            //     _api: "",
                            // },
                            // {
                            //     title: this.$t(
                            //         "message.environmentSetting.export.title_9"
                            //     ),
                            //     _api: "",
                            // },
                            // {
                            //     title: this.$t(
                            //         "message.environmentSetting.export.title_10"
                            //     ),
                            //     _api: "",
                            // },
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_11"
                                ),
                                _api: "/api/ExcelExec/ImportPartSpecification",
                                btn: false,
                            },
                        ],
                    },
                    {
                        Customer: 'All',
                        title: this.$t(
                            "message.environmentSetting.export.title_12"
                        ),
                        children: [
                            {
                                title: this.$hasOption('OPT_IDEM') ?
                                    this.$t("message.environmentSetting.export.title_35") : this.$t("message.environmentSetting.export.title_13"),
                                _api: this.$hasOption('OPT_IDEM') ?
                                    "/api/ManageTab/ImportCGThckStyle" : "/api/ExcelExec/ImportThicknessSample",
                                btn: false,
                            },
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_14"
                                ),
                                _api: "/api/ExcelExec/ImportThicknessOrientation",
                                btn: false,
                            },
                            // {
                            //     title: this.$t(
                            //         "message.environmentSetting.export.title_15"
                            //     ),
                            //     _api: "",
                            // },
                        ],
                    },
                    {
                        Customer: 'Customer003',
                        children: [
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_17"
                                ),
                                _api: "/api/LineIndex/ImportLineIndexExcel",
                                btn: true,
                            },

                        ],
                    },
                ],
                [
                    {
                        Customer: 'All',
                        title: this.$t(
                            "message.environmentSetting.export.title_19"
                        ),
                        children: [
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_20"
                                ),
                                _api: "/api/ExcelExec/ImportConstructionPlan",
                                btn: false,
                            },
                            {
                                // title: this.$t(
                                //     "message.environmentSetting.export.title_30"
                                // ),
                                title: this.$hasOption('OPT_IDEM') ?
                                    this.$t("message.environmentSetting.export.title_34") : this.$t("message.environmentSetting.export.title_30"),
                                _api: this.$hasOption('OPT_IDEM') ?
                                    "/api/ManageTab/ImportCGOperationDetials" : "/api/ExcelExec/ImportInspectionPlan",
                                btn: false,
                            },
                            {
                                // blank
                            }
                        ],
                    },
                    {
                        Customer: 'OPT_FOC',
                        title: this.$t(
                            "message.reportFrom.exportItemTitle6"
                        ),
                        children: [
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_33"
                                ),
                                _api: "/api/customize127/PartsSpecExcel/ImportPartsSpec",
                                btn: true,
                            },

                        ],
                    },
                ],
                [
                    {
                        Customer: 'All',
                        title: this.$t(
                            "message.reportFrom.exportItemTitle3"
                        ),
                        children: [
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_22"
                                ),
                                _api: "/api/ExcelExec/importSummary",
                                btn: false,
                            },
                            // {
                            //     title: this.$t(
                            //         "message.environmentSetting.export.title_23"
                            //     ),
                            //     _api: "",
                            // },
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_31"
                                ),
                                _api: "/api/ExcelExec/ImportSummaryDetial",
                                btn: false,
                            },
                            // {
                            //     title: this.$t(
                            //         "message.environmentSetting.export.title_24"
                            //     ),
                            //     _api: "",
                            // },
                        ],
                    },
                ],
                [
                    {
                        Customer: 'All',
                        title: this.$t(
                            "message.environmentSetting.export.title_25"
                        ),
                        children: [
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_26"
                                ),
                                _api: "/api/ExcelExec/ImportThickDeterResDataCheck",
                                btn: false
                            },
                            {
                                title: this.$t(
                                    "message.environmentSetting.export.title_32"
                                ),
                                _api: "/api/ExcelExec/ImportThicknessMeasurementExperience",
                                btn: false
                            },
                            // {
                            //     title: this.$t(
                            //         "message.environmentSetting.export.title_27"
                            //     ),
                            //     _api: "",
                            // },
                            // {
                            //   title: this.$t("message.environmentSetting.export.title_28"),
                            //   _api: "",
                            // },
                            // {
                            //   title: this.$t("message.environmentSetting.export.title_29"),
                            //   _api: "",
                            // },
                        ],
                    },
                    //その他
                    {
                        Customer: 'All',
                        title: "その他",
                        children: [
                            {
                                title: this.$t("損傷発生条件表"),
                                _api: "/api/ExcelExec/importDamageConditionTable",
                                btn: false,
                            },
                            {
                                title: this.$t("引張許容応力表"),
                                _api: "/api/ExcelExec/ImportTensileAllowableStressTable",
                                btn: false,
                            },
                        ],
                    },
                ]
            ],
            btnActiveClass: true,
            // 2 有数据  1 空白表
            radioTow: "2",
            // 2 所有机器  1 选中的机器
            radio: "1",
            value: 30,
            radioDisabledTop: false,
            radioDisabledBottom: false,
            rowDisabledIpt: true,

            leftListData: {},

            export_dialog_flag: false,

            import_dialog_flag: false,
            api: null,

            fullscreenLoading: false,
        };
    },
    components: {
        "export-dialog": ExportDialog,
        "import-dialog": ImportDialog,
    },
    watch: {},
    methods: {
        checkedChangeFn(e) {
            this.radioTow = '2';
            console.log(this.checked, this.export_item_arr[1][2].children);
            for (let index = 0; index < this.export_item_arr.length; index++) {
                let item = this.export_item_arr[index];
                for (let index1 = 0; index1 < item.length; index1++) {
                    let item1 = item[index1];
                    for (let index2 = 0; index2 < item1.children.length; index2++) {
                        let item2 = item1.children[index2];
                        item2.btn = e
                    }
                }
            }
            this.export_item_arr[1][2].children[0].btn = !e;

            eventBus.$emit('isChangeCustomerAFn', e);
        },
        excelBtnClick(type) {
            // 导入
            if (type === "top") {
                this.radioDisabledTop = false;
                this.radioDisabledBottom = false;
                this.rowDisabledIpt = false;
            } else {
                // 导出
                this.radioDisabledTop = true;
                this.radioDisabledBottom = true;
                this.rowDisabledIpt = true;
                this.radioTow = "2";
                this.radio = "1";
                this.value = 30;
            }
            this.towRowChange(false);
        },
        towRowChange(flg = true) {
            console.log(this.radioTow);
            if (this.radioTow == 2) {
                this.rowDisabledIpt = true;
                if (flg) this.radioDisabledTop = false;

                this.export_item_arr[4][0].children[0].btn = false;
                this.export_item_arr[4][0].children[1].btn = false;
                this.export_item_arr[1][0].children[1].btn = false;

            } else {
                this.rowDisabledIpt = false;
                if (flg) this.radioDisabledTop = true;

                this.export_item_arr[4][0].children[0].btn = true;
                this.export_item_arr[4][0].children[1].btn = true;
                this.export_item_arr[1][0].children[1].btn = true;
            }
        },
        exportItem(i) {
            this.title = i.title;
            this.api = i._api;

            if (!this.btnActiveClass) {
                this.import_dialog_flag = true;
                return;
            }
            this.export_dialog_flag = true;
        },
        exprotDialogItem(data) {

            // console.log(this.$t("message.environmentSetting.export.title_30"), this.title);
            // console.log(this.$t("message.environmentSetting.export.title_20"), this.title);
            // console.log(data, "exprotDialogItemData");
            console.log(this.title);
            // return
            switch (this.title) {
                // 基本样式导出
                case this.$t("message.environmentSetting.export.title_6"):
                    this.exportBaseStyleFun();
                    break;
                // 詳細仕様
                case this.$t("message.environmentSetting.export.title_7"):
                    console.log('title_7');
                    this.ExDetailedSpecificationFun();
                    break;
                case this.$t("message.environmentSetting.export.title_11"):
                    this.ExportPartSpecificationApi();
                    break;
                case this.$t("message.environmentSetting.export.title_2"):
                    //装置导出
                    this.exportPlatApi();
                    break;
                case this.$t("message.environmentSetting.export.title_3"):
                    //处理系 excel导出
                    this.exportPFDApi();
                    break;
                case this.$t("message.environmentSetting.export.title_22"):
                    this.exportSummaryApi(data);
                    break;

                case this.$t("message.environmentSetting.export.title_31"):
                    this.exportSummaryDetialApi(data);
                    break;
                // 导出肉厚方位
                case this.$t("message.environmentSetting.export.title_14"):
                    this.exportThickPositionApi(data);
                    break;

                // 导出肉厚式样
                case this.$t("message.environmentSetting.export.title_13"):
                    this.exportThickStyleApi(data);
                    break;
                // 导出肉厚方位 || 出光-管理表(肉厚)
                case this.$t("message.environmentSetting.export.title_35"):
                    this.exportThickStyleApi(data);
                    break;
                // 导出肉厚测定结果
                case this.$t("message.environmentSetting.export.title_26"):
                    this.exportThickDeterResApi(data);
                    break;
                // 导出肉厚测定结果
                case this.$t("message.environmentSetting.export.title_32"):
                    this.ExportThicknessMeasurementExperienceFn();
                    break;
                // 导出工时计划
                case this.$t("message.environmentSetting.export.title_20"):
                    this.ExportConstructionPlanFn();
                    break;
                // 导出目视非破坏计划
                case this.$t("message.environmentSetting.export.title_30"):
                    this.ExInspectionPlanFn(data);
                    break;
                case this.$t("message.environmentSetting.export.title_34"):
                    this.ExInspectionPlanFn(data);
                    break;
                case this.$t("message.environmentSetting.export.title_17"):
                    this.ExLineIndexExcelFn(data);
                    break;
                case this.$t("損傷発生条件表"):
                    this.exportDamageConditionTableApi();
                    break;
                case this.$t("引張許容応力表"):
                    this.exportTensileAllowableStressTableApi();
                    break;
                case this.$t("message.environmentSetting.export.title_33"):
                    this.ExportPartsSpecApi(data);
                    break;
                default:
                    this.$alert(this.$t("we will support soon."), '', {
                        confirmButtonText: 'OK',
                        type: 'warning',
                    });
                    return;
            }
        },
        //  ラインインデックス 
        async ExLineIndexExcelFn(Data) {
            console.log('this.leftListData', this.leftListData);
            let macCodeList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.row.macCode == ""
                    ? (macCodeList = [])
                    : macCodeList.push(this.leftListData.row.macCode);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macCodeList.push(i.macCode);
                });
            }
            console.log(macCodeList);
            if (parseInt(this.radioTow) == 2 && macCodeList.length == 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }
            let D = {
                excuType: parseInt(this.radioTow),
                Line: parseInt(this.value),
                SelType: Number(this.radio),
                pltCode: this.leftListData.row.PltCode,
                MacName: this.leftListData.row.MacName,
                LawCode: this.leftListData.row.LawCode == '' ? 0 : this.leftListData.row.LawCode,
                CtgCode: this.leftListData.row.CtgCode == '' ? 0 : this.leftListData.row.CtgCode,
                MacCode: this.leftListData.row.macCode,

                // macType: parseInt(this.leftListData.row.macType),
                // pltCode: this.leftListData.row.pltCode,
                // excuType: parseInt(this.radioTow),
                // ExportType: this.$refs.ExportDialogRef.ExportType,
                // Line: parseInt(this.value),
                // ...Data
            }
            this.fullscreenLoading = true;
            let res = await ExLineIndexExcel(D);
            this.fullscreenLoading = false;
            if (res.data.code != 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                    callback: action => {
                    }
                })
                return
            }

            this.export_dialog_flag = false;
            this.fullscreenLoading = false;
            // window.open(res.data.data);
            let str = res.data.data;
            let parts = str.split('\\');
            let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
            this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
            this.$message.success(res.data.msg);

        },
        // 导出目视非破坏计划
        async ExInspectionPlanFn(Data) {
            console.log('this.leftListData', this.leftListData.row.macType, Data);
            let macCodeList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.row.macCode == ""
                    ? (macCodeList = [])
                    : macCodeList.push(this.leftListData.row.macCode);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macCodeList.push(i.macCode);
                });
            }
            console.log(macCodeList);
            if (parseInt(this.radioTow) == 2 && macCodeList.length == 0) {

                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }
            let D = {
                dmgCode: macCodeList,
                macType: parseInt(this.leftListData.row.macType),
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                ExportType: this.$refs.ExportDialogRef.ExportType,
                Line: parseInt(this.value),
                ...Data
            }
            this.fullscreenLoading = true;
            let API = this.$hasOption('OPT_IDEM') ? exportCGOperationDetials : ExInspectionPlan;
            let res = await API(D);
            this.fullscreenLoading = false;
            if (res.data.code != 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                    callback: action => {
                    }
                })
                return
            }

            this.export_dialog_flag = false;
            this.fullscreenLoading = false;
            // window.open(res.data.data);
            let str = res.data.data;
            let parts = str.split('\\');
            let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
            this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
            this.$message.success(res.data.msg);

        },
        // 导出工时计划
        async ExportConstructionPlanFn() {




            let macCodeList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.row.macCode == ""
                    ? (macCodeList = [])
                    : macCodeList.push(this.leftListData.row.macCode);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macCodeList.push(i.macCode);
                });
            }
            console.log(macCodeList);
            if (parseInt(this.radioTow) == 2 && macCodeList.length == 0) {

                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }
            let D = {
                dmgCode: macCodeList,
                macType: parseInt(this.leftListData.row.macType),
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                ExportType: this.$refs.ExportDialogRef.ExportType,
                Line: parseInt(this.value),
            }
            this.fullscreenLoading = true;
            let res = await ExportConstructionPlan(D);
            this.fullscreenLoading = false;
            if (res.data.code != 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                    callback: action => {
                    }
                })
                return
            }

            this.export_dialog_flag = false;
            this.fullscreenLoading = false;
            // window.open(res.data.data);

            let str = res.data.data;
            let parts = str.split('\\');
            let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
            this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
            this.$message.success(res.data.msg);
        },
        // 詳細仕様
        async ExDetailedSpecificationFun() {
            let macCodeList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.row.macCode == ""
                    ? (macCodeList = [])
                    : macCodeList.push(this.leftListData.row.macCode);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macCodeList.push(i.macCode);
                });
            }
            console.log(macCodeList);
            if (parseInt(this.radioTow) == 2 && macCodeList.length == 0) {

                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }
            let D = {
                dmgCode: macCodeList,
                macType: parseInt(this.leftListData.row.macType),
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                ExportType: this.$refs.ExportDialogRef.ExportType,
                MacNumbLike: ''
            }
            this.fullscreenLoading = true;
            let res = await ExDetailedSpecification(D);
            this.fullscreenLoading = false;
            if (res.data.code != 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                    callback: action => {
                    }
                })
                return
            }

            this.export_dialog_flag = false;
            this.fullscreenLoading = false;
            // window.open(res.data.data);
            let str = res.data.data;
            let parts = str.split('\\');
            let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
            this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
            this.$message.success(res.data.msg);
        },
        // 基本样式导出
        exportBaseStyleFun() {
            let macNumbList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macName ||
                    this.leftListData.row.macName == ""
                    ? (macNumbList = [])
                    : macNumbList.push(this.leftListData.row.macName);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macNumbList.push(i.macName);
                });
            }

            if (parseInt(this.radioTow) == 2 && macNumbList.length == 0) {
                this.$alert(this.$t("message.environmentSetting.export.exportParamWarn"), '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }

            let dataJson = {
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
                macType: parseInt(this.leftListData.row.macType),
                macNumb: macNumbList,
            };
            this.fullscreenLoading = true;
            exportBaseStyle(dataJson)
                .then((res) => {
                    this.fullscreenLoading = false;
                    if (res.data.code != 0) {
                        this.$alert(res.data.msg, '', {
                            confirmButtonText: 'OK',
                            type: 'warning',
                            callback: action => {
                            }
                        })
                        return
                    }

                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    // window.open(res.data.data);
                    let str = res.data.data;
                    let parts = str.split('\\');
                    let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
                    this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.fullscreenLoading = false;
                });
        },
        // 取替登录导出
        async ExportThicknessMeasurementExperienceFn() {
            // console.log(this.leftListData.row);
            // console.log(this.$refs.ExportDialogRef.ExportType);
            let macCodeList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.row.macCode == ""
                    ? (macCodeList = [])
                    : macCodeList.push(this.leftListData.row.macCode);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macCodeList.push(i.macCode);
                });
            }
            console.log(macCodeList);
            if (parseInt(this.radioTow) == 2 && macCodeList.length == 0) {

                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }
            let D = {
                dmgCode: macCodeList,
                macType: parseInt(this.leftListData.row.macType),
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                ExportType: this.$refs.ExportDialogRef.ExportType
            }
            this.fullscreenLoading = true;
            let res = await ExportThicknessMeasurementExperience(D);
            this.fullscreenLoading = false;
            if (res.data.code != 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                    callback: action => {
                    }
                })
                return
            }

            this.export_dialog_flag = false;
            this.fullscreenLoading = false;
            // window.open(res.data.data);
            let str = res.data.data;
            let parts = str.split('\\');
            let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
            this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
            this.$message.success(res.data.msg);

        },
        // 部品仕样导出
        async ExportPartSpecificationApi() {
            // 验证
            let D = {
                NumberOfRow: parseInt(this.value),
            };
            let R = await ExportPartSpecificationVerify(D);
            if (!R) {
                return
            }

            let macNumbList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macName ||
                    this.leftListData.row.macName == ""
                    ? (macNumbList = [])
                    : macNumbList.push(this.leftListData.row.macName);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macNumbList.push(i.macName);
                });
            }

            if (parseInt(this.radioTow) == 2 && macNumbList.length == 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }

            let dataJson = {
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
                macType: parseInt(this.leftListData.row.macType),
                macNumb: macNumbList,
                PltName: this.$store.state.plantName,
                // ExObject: 'xxx'
            };

            this.fullscreenLoading = true;
            ExportPartSpecification(dataJson)
                .then((res) => {
                    this.fullscreenLoading = false;
                    if (res.data.code != 0) {
                        this.$alert(res.data.msg, '', {
                            confirmButtonText: 'OK',
                            type: 'warning',
                            callback: action => {
                            }
                        })
                        return
                    }

                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    // window.open(res.data.data);
                    let str = res.data.data;
                    let parts = str.split('\\');
                    let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
                    this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.fullscreenLoading = false;
                });
        },
        // 肉厚方位导出
        exportThickPositionApi() {
            let macCodeList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.row.macCode == ""
                    ? (macCodeList = [])
                    : macCodeList.push(this.leftListData.row.macCode);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macCodeList.push(i.macCode);
                });
            }

            if (parseInt(this.radioTow) == 2 && macCodeList.length == 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }

            let dataJson = {
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
                macType: parseInt(this.leftListData.row.macType),
                dmgCode: macCodeList,
            };

            this.fullscreenLoading = true;

            exportThickPosition(dataJson)
                .then((res) => {
                    this.fullscreenLoading = false;
                    if (res.data.code != 0) {
                        this.$alert(res.data.msg, '', {
                            confirmButtonText: 'OK',
                            type: 'warning',
                            callback: action => {
                            }
                        })
                        return
                    }

                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    // window.open(res.data.data);
                    let str = res.data.data;
                    let parts = str.split('\\');
                    let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
                    this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.fullscreenLoading = false;
                });
        },
        //装置导出
        exportPlatApi() {
            let dataJson = {
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
            };
            this.fullscreenLoading = true;
            exportPlat(dataJson)
                .then((res) => {
                    this.fullscreenLoading = false;
                    if (res.data.code != 0) {
                        this.$alert(res.data.msg, '', {
                            confirmButtonText: 'OK',
                            type: 'warning',
                            callback: action => {
                            }
                        })
                        return
                    }
                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    // window.open(res.data.data);
                    let str = res.data.data;
                    let parts = str.split('\\');
                    let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
                    this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.fullscreenLoading = false;
                });
        },
        //处理系 excel导出
        exportPFDApi() {
            let dataJson = {
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
            };
            this.fullscreenLoading = true;
            exportPFD(dataJson)
                .then((res) => {
                    this.fullscreenLoading = false;
                    if (res.data.code != 0) {
                        this.$alert(res.data.msg, '', {
                            confirmButtonText: 'OK',
                            type: 'warning',
                            callback: action => {
                            }
                        })
                        return
                    }
                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    // window.open(res.data.data);
                    let str = res.data.data;
                    let parts = str.split('\\');
                    let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
                    this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.export_dialog_flag = false;
                    // this.fullscreenLoading = false;
                });
        },
        //目视非破坏履历导出
        exportSummaryApi(data) {
            let macCodeList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.row.macCode == ""
                    ? (macCodeList = [])
                    : macCodeList.push(this.leftListData.row.macCode);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macCodeList.push(i.macCode);
                });
            }
            console.log(macCodeList);
            if (parseInt(this.radioTow) == 2 && macCodeList.length == 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }

            let dataJson = {
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
                macType: parseInt(this.leftListData.row.macType),
                dmgCode: macCodeList,
                actuKbn: parseInt(data.actuKbn) ? parseInt(data.actuKbn) : 0,
                begionDate: data.begionDate ? data.begionDate : "",
                endDate: data.endDate ? data.endDate : "",
            };
            this.fullscreenLoading = true;
            exportSummary(dataJson)
                .then((res) => {
                    this.fullscreenLoading = false;
                    if (res.data.code != 0) {
                        this.$alert(res.data.msg, '', {
                            confirmButtonText: 'OK',
                            type: 'warning',
                            callback: action => {
                            }
                        })
                        return
                    }

                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    // window.open(res.data.data);
                    let str = res.data.data;
                    let parts = str.split('\\');
                    let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
                    this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.fullscreenLoading = false;
                });
        },
        //验证输入
        changeInput() {
            var pattern = /^[1-9][0-9]*$/; // 正整数的正则表达式
            if (this.value > 999) {
                this.value = 999
            }
            // 不符合正整数时
            if (!pattern.test(this.value)) {
                // input 框绑定的内容为空

                this.value = "";
            }
        },
        exportSummaryDetialApi(data) {
            let macCodeList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.row.macCode == ""
                    ? (macCodeList = [])
                    : macCodeList.push(this.leftListData.row.macCode);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macCodeList.push(i.macCode);
                });
            }

            if (parseInt(this.radioTow) == 2 && macCodeList.length == 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }

            let dataJson = {
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
                macType: parseInt(this.leftListData.row.macType),
                dmgCode: macCodeList,
                actuKbn: parseInt(data.actuKbn) ? parseInt(data.actuKbn) : 0,
                ssnBeginDate: data.begionDate ? data.begionDate : "",
                ssnEndDate: data.endDate ? data.endDate : "",
                userAccount: getLocalStorage("userName"),
            };
            this.fullscreenLoading = true;
            exportSummaryDetial(dataJson)
                .then((res) => {
                    this.fullscreenLoading = false;
                    if (res.data.code == 311) {
                        this.fullscreenLoading = false;

                        this.$alert(`5,000行以内のデータ数はエクスポート可能です。今回のエクスポートデータ数は${res.data.data}行です。フィルタ条件を再確認してください。`, '', {
                            confirmButtonText: 'OK',
                            type: 'warning',
                        });


                        return;
                    }
                    this.fullscreenLoading = false;
                    if (res.data.code != 0) {
                        this.$alert(res.data.msg, '', {
                            confirmButtonText: 'OK',
                            type: 'warning',
                        })
                        return
                    }

                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    // window.open(res.data.data);
                    let str = res.data.data;
                    let parts = str.split('\\');
                    let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
                    this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.fullscreenLoading = false;
                });
        },
        //肉厚式样
        exportThickStyleApi(data) {
            let macCodeList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.row.macCode == ""
                    ? (macCodeList = [])
                    : macCodeList.push(this.leftListData.row.macCode);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macCodeList.push(i.macCode);
                });
            }
            let dataJson = {
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
                macType: parseInt(this.leftListData.row.macType),
                dmgCode: macCodeList,
                exportObj: data.exportObj,
            };

            if (parseInt(this.radioTow) == 2 && macCodeList.length == 0) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }

            this.fullscreenLoading = true;
             let API = this.$hasOption('OPT_IDEM') ? ExportCGThckStyle : exportThickStyle;
             API(dataJson)
                .then((res) => {
                    this.fullscreenLoading = false;
                    if (res.data.code != 0) {
                        this.$alert(res.data.msg, '', {
                            confirmButtonText: 'OK',
                            type: 'warning',
                            callback: action => {
                            }
                        })
                        return
                    }

                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    // window.open(res.data.data);
                    let str = res.data.data;
                    let parts = str.split('\\');
                    let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
                    this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.fullscreenLoading = false;
                });
        },
        // 导出肉厚测定结果
        exportThickDeterResApi(data) {
            console.log(data);
            if (parseInt(this.radioTow) == 1) {
                this.$alert(res.data.msg, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                });
                return;
            }

            let macCodeList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.row.macCode == ""
                    ? (macCodeList = [])
                    : macCodeList.push(this.leftListData.row.macCode);
            } else if (this.radio == "2") {
                this.leftListData.data.forEach((i) => {
                    macCodeList.push(i.macCode);
                });
            }

            if (parseInt(this.radioTow) == 2 && macCodeList.length == 0) {
                return;
            }

            if (data.measureEval == '') {
                this.$alert('必須項目を正しく入力して下さい。', '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                })
                return
            }

            let dataJson = {
                pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
                macType: parseInt(this.leftListData.row.macType),
                dmgCode: macCodeList,
                exportObj: data.exportObj,
                operDate: data.operDate,
                exportBegYear: data.exportBegYear,
                exportPeriod: data.exportPeriod,
                impDateType: data.impDateType,
                impDate: data.impDate,
                ispWayType: data.ispWayType == "" ? 0 : data.ispWayType,
                msrPnt: data.msrPnt,
                insDistinguish: data.insDistinguish,
                measureEval: data.measureEval,
            };
            this.fullscreenLoading = true;
            exportThickDeterRes(dataJson)
                .then((res) => {
                    this.fullscreenLoading = false;
                    if (res.data.code != 0) {
                        this.$alert(res.data.msg, '', {
                            confirmButtonText: 'OK',
                            type: 'warning',
                            callback: action => {
                            }
                        })
                        return
                    }

                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    // window.open(res.data.data);
                    let str = res.data.data;
                    let parts = str.split('\\');
                    let fileName = parts.pop(); // 获取并移除数组的最后一个元素  
                    this.$downFileByBlob({ path: res.data.data, isDown: true, fileName: fileName, isOpenNewBlank: false })
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.fullscreenLoading = false;
                });
        },

        //損傷発生条件表excel导出
        exportDamageConditionTableApi() {
            let dataJson = {
                //pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
            };
            this.fullscreenLoading = true;
            exportDamageConditionTable(dataJson)
                .then((res) => {
                    if (!res) {
                        this.fullscreenLoading = false;
                        return
                    }
                    if (res.data.code != 0) {
                        this.fullscreenLoading = false;
                        this.$message.error(res.data.msg);
                        return;
                    }
                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    window.open(res.data.data);
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.export_dialog_flag = false;
                    // this.fullscreenLoading = false;
                });
        },

        exportTensileAllowableStressTableApi() {
            let dataJson = {
                //pltCode: this.leftListData.row.pltCode,
                excuType: parseInt(this.radioTow),
                line: parseInt(this.value),
            };
            this.fullscreenLoading = true;
            exportTensileAllowableStressTable(dataJson)
                .then((res) => {
                    if (!res) {
                        this.fullscreenLoading = false;
                        return
                    }
                    if (res.data.code != 0) {
                        this.fullscreenLoading = false;
                        this.$message.error(res.data.msg);
                        return;
                    }
                    // var strUrl = res.data.data.replace(/\\/,"/");
                    // window.open(`http://view.officeapps.live.com/op/view.aspx?src=${ encodeURIComponent(strUrl) }`);
                    window.open(res.data.data);
                    this.$message.success(res.data.msg);
                    this.export_dialog_flag = false;
                    this.fullscreenLoading = false;
                })
                .finally(() => {
                    // this.export_dialog_flag = false;
                    // this.fullscreenLoading = false;
                });
        },

        async ExportPartsSpecApi(data) {
            let macNumberList = [];
            if (this.radio == "1") {
                !this.leftListData.row.macCode ||
                    this.leftListData.macCode == "" ?
                    macNumberList = [] :
                    macNumberList.push(this.leftListData.row.macCode);
            } else {
                this.leftListData.data.forEach((item) => {
                    macNumberList.push(item.macCode);
                })
            }

            if (parseInt(this.radioTow) == 2 && macNumberList.length == 0) {
                return;
            }

            let dataJson = {
                PltCode: this.leftListData.row.pltCode,
                DmgCode: macNumberList,
                ExcuType: parseInt(this.radioTow),
                Line: parseInt(this.value)
            };
            this.fullscreenLoading = true;
            try {
                var res = await ExportPartsSpec(dataJson);
                this.fullscreenLoading = false;
                this.export_dialog_flag = false;
                if (res === undefined || res.data === undefined) {
                    // 何もしない
                }
                else if (res.data.code != 0) {
                    this.$alert(res.data.msg, '', {
                        confirmButtonText: 'OK',
                        type: 'warning',
                        callback: action => {
                        }
                    });
                    return;
                } else {
                    window.open(res.data.data);
                    this.$message.success(res.data.msg);
                }
            } catch (err) {
                this.fullscreenLoading = false;
                this.export_dialog_flag = false;
                this.$alert(err, '', {
                    confirmButtonText: 'OK',
                    type: 'warning',
                    callback: action => {
                    }
                });
            }
        }
    },
    created() { },
    mounted() {
        let _this = this;
        eventBus.$on("leftListData", (res) => {
            if (res) {
                console.log(11111111111);
                _this.leftListData = res;
            } else {
                console.log(22222222222);
                _this.leftListData = {
                    row: {
                        ctgCode: null,
                        dwgID: null,
                        impCode: null,
                        indoorAddr: null,
                        indoorID: null,
                        macCode: "",
                        macName: this.$store.state.excelMacName,
                        name: this.$store.state.excelMacNameb,
                        pltCode: this.$store.state.excelPltCode,
                        macType: this.$store.state.excelMacType,
                    },
                    data: [],
                };
            }
            if (_this.$hasOption('OPT_FOC')) {
                _this.export_item_arr[2][1].children[0].btn = parseInt(this.$store.state.excelMacType) === 2;
            }
            console.log(_this.leftListData, "---------");
        });

        /**
         * 筛选不同站点的导入导出
         */
        // if (!this.$hasOption('OPT_IDEM')) {
        //     delete this.export_item_arr[1][2]
        // }
    },
    beforeDestroy() {
        eventBus.$off("leftListData");
    },

    computed: {
    },
};
</script>
<style lang="scss" scoped>
.export-container {
    height: 100%;
}

.container {
    width: 100%;
    height: 100%;

    .nav {
        width: 100%;
        height: 32px;
        display: flex;
        align-items: center;
        margin-top: 16px;
    }

    .nav:nth-child(2) {
        margin-top: 30px;
    }

    .tabs-container {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 344px;
        min-height: 32px;
        // border: 1px solid #d3d3d3;
        background: #fff;
        border-radius: 4px;
        margin-right: 24px;

        button {
            width: 50% !important;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            margin: 0;
            border-radius: 0;
        }

        button:nth-child(1) {
            // border-right: 1px solid #d3d3d3;
        }

        .activeBtn {
            // background: #106ebe;
            // color: #fff;
        }

        ::v-deep .el-radio {
            width: 50%;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0;
        }
    }

    .im-ex-btns {
        background: none;
        border: 0px solid #d3d3d3;
    }

    .isSelect {
        background: #f8f8f8;
    }

    .row-input {
        display: flex;
        align-items: center;
        justify-content: flex-start;

        span {
            color: #333333;
        }

        ::v-deep .el-input {
            width: 48px;
            height: 32px;
            margin: 0 16px 0 8px;
        }

        ::v-deep .el-input__inner {
            width: 56px;
            height: 32px;
        }

        ::v-deep .el-input__inner.disabled:hover {
            cursor: pointer;
        }
    }

    .active-row-input {
        ::v-deep .el-input__inner {
            background-color: #FEDDB1;
            // width: 56px;
        }
    }

    .export-item-container {
        width: 100%;
        display: flex;
        // align-items: center;
        justify-content: flex-start;
        margin-top: 10px;

        .item-container {
            width: 190px;
            margin-right: 24px;

            .item {
                width: 100% !important;
                height: 32px;
                margin-bottom: 12px;
                // color: rgba(0, 0, 0, 0.65);
                display: flex;
                align-items: center;
                line-height: 0px;
                justify-content: center;
                // background: #fff;
                // border: 1px solid #d3d3d3;
                border-radius: 4px;
                // cursor: pointer;
            }

            .item-nth-child {
                width: 100%;
                height: 32px;
                display: flex;
                align-items: center;
                justify-content: center;
                font-weight: bold;
                color: #1f2329;
                background: none;
                border: 0 none;
                margin: 0;
                cursor: text;

                ::v-deep .el-checkbox {
                    font-weight: bold;
                    color: #1f2329;
                    transform: translateX(-14px);
                }

                ::v-deep .el-checkbox__input {
                    transform: translateX(-23px);
                }

            }
        }
    }
}
</style>
